package com.csc.bankingsystem.core.dto;

import java.util.Date;

import com.csc.bankingsystem.core.entity.AccountInfo;
import com.csc.bankingsystem.core.entity.HistoryRecord;
import com.csc.bankingsystem.core.entity.TransferRecord;
import com.csc.bankingsystem.core.entity.UserInfo;
import com.csc.bankingsystem.core.enumeration.TransferRecordStatusEnum;
import com.csc.bankingsystem.core.enumeration.TransferRecordUnitEnum;

/**
 * TransferRecord Data Transfer Object
 * 
 * @author angelkid
 *
 */
public class TransferRecordDTO {
	private String sourceAccountNumber;
	private String destinationAccountNumber;
	private Date transDate;
	private Long amount;
	private TransferRecordUnitEnum unit;
	private String message;
	private TransferRecordStatusEnum status;
	private Long remainAmount;
	private String username;

	public TransferRecordDTO(TransferRecord record) {
		super();
		this.sourceAccountNumber = record.getSource().getNumber();
		this.destinationAccountNumber = record.getDestination().getNumber();
		this.transDate = record.getTransDate();
		this.amount = record.getAmount();
		this.unit = record.getUnit();
		this.message = record.getMessage();
		this.status = record.getStatus();
		this.remainAmount = record.getRemainAmount();
		this.username = record.getHistoryRecord().getUserInfo().getLoginId();
		
	}

	public String getSourceAccountNumber() {
		return sourceAccountNumber;
	}

	public void setSourceAccountNumber(String sourceAccountNumber) {
		this.sourceAccountNumber = sourceAccountNumber;
	}

	public String getDestinationAccountNumber() {
		return destinationAccountNumber;
	}

	public void setDestinationAccountNumber(String destinationAccountNumber) {
		this.destinationAccountNumber = destinationAccountNumber;
	}

	public Date getTransDate() {
		return transDate;
	}

	public void setTransDate(Date transDate) {
		this.transDate = transDate;
	}

	public Long getAmount() {
		return amount;
	}

	public void setAmount(Long amount) {
		this.amount = amount;
	}

	public TransferRecordUnitEnum getUnit() {
		return unit;
	}

	public void setUnit(TransferRecordUnitEnum unit) {
		this.unit = unit;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public TransferRecordStatusEnum getStatus() {
		return status;
	}

	public void setStatus(TransferRecordStatusEnum status) {
		this.status = status;
	}

	public Long getRemainAmount() {
		return remainAmount;
	}

	public void setRemainAmount(Long remainAmount) {
		this.remainAmount = remainAmount;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

}
